import {WrapIssueForTable} from 'gitee-simple-db'

const FixedItemsTable = new WrapIssueForTable("fixed_items")

const getAll = async () => {
    return await FixedItemsTable.getAllData()
}
const getOne = async(id: number) => {
    return await FixedItemsTable.getOneData(id)
}
const addOne = async(data: any) => {
    return await FixedItemsTable.addOneData(data)
}
const updateOne = async(data: any) => {
    return await FixedItemsTable.updateOneData(data)
}
const deleteOne = async(id: number) => {
    return await FixedItemsTable.updateDataByIdWithData(id, {enabled: false})
}

export const FixedItemsOperation = {
    getAll,
    getOne,
    addOne,
    deleteOne,
    updateOne,
}